1. A content writer is editing college profiles and wants to get the college name, and the field named 'Updated_location' obtained by replacing 'Bengaluru' with 'Bengalore' in the location descriptions to ensure accuracy.
SELECT College, REPLACE(Location, 'Bengaluru', 'Bengalore') AS Updated_location FROM Colleges
2. A curriculum developer is searching for courses and needs the list of subject names and want to locate the position of 'Python' in subject names to ensure proper categorization displayed as 'Position_of_Python'.
SELECT Subject_name, CHARINDEX('Python', Subject_name) AS Position_of_Python FROM Subjects
3. An auditor is reviewing the college and its locations displayed as 'Position_in_location' and wants to find the position of 'Bengaluru' in each location to verify the accuracy of regional data.
SELECT College, CHARINDEX('Bengaluru', Location) AS Position_in_location FROM Colleges
4. A marketing manager is preparing promotional materials and needs to display company names in lowercase as 'Lowercase_company' along with their respective package amounts.
SELECT LOWER(Company_name) AS Lowercase_company, Package FROM Companies
5. In an academic review, a dean wants to see the names of all lecturers in uppercase to facilitate easier communication and recognition displaying it in the field named 'Uppercase_Name'.
SELECT UPPER(First_name) AS Uppercase_Name FROM Lecturers
6. A researcher is analyzing subject data and wants to list the subject name and field named 'subject_code' extracted from the first 3 characters of subject names.
SELECT Subject_name, SUBSTRING(Subject_name, 1, 3) AS Subject_code FROM Subjects
7. An admissions officer reviews student data and prefers to see the student USN and their respective branch in lowercase displayed as 'Lowercase_Branch' for better readability and uniformity.
SELECT Usn, LOWER(Branch) AS Lowercase_Branch FROM Students
8. A database administrator is performing some fun checks and wants to check the student's names in reverse order to check how it looks, so help him in listing the actual student name and reversed student name displayed in the field name 'Reversed_Student_Name'.
SELECT First_name, REVERSE(First_name) AS Reversed_Student_Name FROM Students
9. A financial analyst is compiling reports on company packages. They need a concise summary of company names and their corresponding package amounts separated by ':' displayed in the field named 'Company_Package'.
SELECT CONCAT(Company_name, ':', Package) AS Company_Package FROM Companies
10. A database manager is standardizing data and wants to see the college names and their respective locations in uppercase displayed as a field name 'Uppercase_Location'.
SELECT College, UPPER(Location) AS Uppercase_Location FROM Colleges
11. A career counselor is updating job titles and wants to replace 'Engineer' with 'Developer' in all job roles for better alignment with current industry terminology, and wants to know how it looks after the changes, help him to fetch the Student USN, actual job role and new job role displayed as field named 'new_job_role'.
SELECT Usn, Job_role, REPLACE(Job_role, 'Engineer', 'Developer') AS new_job_role FROM Students
12. A professor is evaluating student performance and wants to round the CGPA of students to the nearest integer for grading purposes, help to fetch the Student USN, Name and the Rounded CGPA displayed as a field named 'Rounded_CGPA'.
SELECT Usn, First_name, ROUND(CGPA, 0) AS Rounded_CGPA FROM Students
13. A student is preparing for an exam and needs to remember the last 5 characters of their unique student number for registration purposes so list his actual serial number and the field named 'Last_five_chars' from his actual serial number.
SELECT Usn, RIGHT(Usn, 5) AS Last_five_chars FROM Students
14. A lecturer is curious about the reversed names of their colleagues to see if any hidden messages or patterns emerge from it, so can you help them to list the lecturer's names displayed as 'Reversed_name'.
SELECT REVERSE(First_name) AS Reversed_name FROM Lecturers
15. A finance manager of the Company is preparing financial reports and wants to represent the Package offered in 'K', ie., in thousands, and round that to the nearest tens for accurate budgeting. So display the list of Company_name, normal package, and the new Package displayed as 'Rounded_Package_in_K'.
SELECT Company_name, Package, ROUND(Package / 1000.0 / 100.0, 0) * 100 AS Rounded_Package_in_K FROM Companies